package com.xcity.game.combat.template;

import com.xcity.game.combat.attr.CombatAttributeType;

import naga.x.game.template.annotation.Excel;

@Excel(value = "combat.xlsx", sheet = 1, isStatic = true)
public class CombatPowerConfig {

	/** 物攻系数 */
	public static float attackPowerRatio = 1f;
	/** 法攻系数 */
	public static float magicPowerRatio = 1f;
	/** 物防系数 */
	public static float defenseRatio = 1f;
	/** 法防系数 */
	public static float magicDefenseRatio = 1f;
	/** 生命值系数 */
	public static float hpRatio = 1f;
	/** 韧性系数 */
	public static float avoidCritRatio = 1f;
	/** 速度系数 */
	public static float attackSpeedRatio = 1f;
	/** 闪避系数 */
	public static float dodgeRatio = 1f;
	/** 抵抗系数 */
	public static float resistRatio = 1f;
	/** 物攻命中系数 */
	public static float hitRateRatio = 1f;
	/** 法攻命中系数 */
	public static float magicHitRateRatio = 1f;
	/** 暴击系数 */
	public static float critRatio = 1f;
	
	public static float getRatio(CombatAttributeType type) {
		if (type == CombatAttributeType.ATTACK_POWER) {
			return attackPowerRatio;
		}
		if (type == CombatAttributeType.MAGIC_POWER) {
			return magicPowerRatio;
		}
		if (type == CombatAttributeType.DEFENSE) {
			return defenseRatio;
		}
		if (type == CombatAttributeType.MAGIC_DEFENSE) {
			return magicDefenseRatio;
		}
		if (type == CombatAttributeType.MAX_HP) {
			return hpRatio;
		}
		if (type == CombatAttributeType.AVOID_CRIT) {
			return avoidCritRatio;
		}
		if (type == CombatAttributeType.ATTACK_SPEED) {
			return attackSpeedRatio;
		}
		if (type == CombatAttributeType.DODGE) {
			return dodgeRatio;
		}
		if (type == CombatAttributeType.RESIST) {
			return resistRatio;
		}
		if (type == CombatAttributeType.HIT_RATE) {
			return hitRateRatio;
		}
		if (type == CombatAttributeType.MAGIC_HIT_RATE) {
			return magicHitRateRatio;
		}
		if (type == CombatAttributeType.CRIT) {
			return critRatio;
		}
		return 0f;
	}
	
}
